<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="webkit|ie-copm|ie-stand" name="renderer"/>
<meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"/>
<title>梦享科技题库</title>
<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet"/>
<link href="__PUBLIC__/css/style.css" rel="stylesheet"/>
<link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet"/>
<!--[if lt IE 9]>
	<link href="css/font-awesome-ie7.min.css" rel="stylesheet"/>
<![endif]-->
<!--[if lt IE 9]>
	<script src="js/html5shiv.js"></script>
<![endif]-->
<script src="__PUBLIC__/js/jquery-2.1.4.min.js"></script>
<script src="__PUBLIC__/js/respond.js"></script>
		
</head>
<body>
<div class="banner">
	<div class="wriper">
		<div class="logo"><img class="img1" src="__PUBLIC__/img/logo.png"/></div>
	</div>
</div>
<div class="wriper" style="min-height:85.2%;">
	<div class="title2">
		<span>梦享科技题库</span>
		<span>></span>
		<span>{$list.name}</span>
	</div>
	<div class="content1">
		<h2><b>{$list.name}</b></h2>
		<div class="begin-wriper">
			<div class="begin-img"><img src="__PUBLIC__/img/begin.png"/></div>
			<div class="begin-word">
				<p>1、请在规定时间完成试卷内全部题目，考试时间结束，系统将自动交卷。</p>
				<p>2、所有题目可通过答题卡返回修改，点击提前交卷后试卷提交，将无法继续答案，请谨慎提交。</p>
				<p>3、请诚信答题，独立完成。</p>
				<p>4、祝你好运。</p>
			</div>
		</div>

		<form class="form-horizontal" style="margin: 0 0 80px 402px; width: 300px; height: 20px ; line-height: 20px;">
			  <div class="control-group">
			    <label class="control-label" for="inputEmail">姓名：</label>
			    <div class="controls">
			      <input type="text" name="username" id="inputname" >
			    </div>
			  </div>
			  <div class="control-group">
			    <label class="control-label" for="inputPassword">联系电话：</label>
			    <div class="controls">
			      <input type="text" name="phone" id="inputphone" >
			    </div>
			  </div>
	    </form> 
		<div class="begin-btn"><button class="btn btn-primary " id="start"type="button">开始做题</button></div>
	</div>
</div>
<div class="foot">
	<p class="p1">梦享科技</p>
	<p><a href="http://www.miibeian.gov.cn/">© 2015-8 IDDO.</a> All rights resevered</p>
	<p><a href="http://memxiang.com">梦享科技</a>  版权所有</p>
</div>
<script type="text/javascript">
$(function(){

		function checkSubmitMobil() { 
		if ($("#inputphone").val() == "") { 
		alert("手机号码不能为空！"); 
		//$("#moileMsg").html("<font color='red'>手机号码不能为空！</font>"); 
		$("#inputphone").focus(); 
		return false; 
		} 

		if (!$("#inputphone").val().match(/^(((13[0-9]{1})|159|153)+\d{8})$/)) { 
		alert("手机号码格式不正确！"); 
		//$("#moileMsg").html("<font color='red'>手机号码格式不正确！请重新输入！</font>"); 
		$("#inputphone").focus(); 
		return false; 
		} 
		return true; 
		} 


    $('#start').click(function(){
    	$username = $('#inputname').val();
    	$phone = $('#inputphone').val();
    	if($username.length > 0 && $username.length<= 4){
           if(checkSubmitMobil() == true){
	           $.ajax({
	             type: 'POST',
	             url: '__APP__/Home/begin/jaxaMessage' ,
	             data: {
	             	'username' : $username ,
	             	'phone' : $phone,
	             	'sid' : {$list.id}
	             } ,
	            success:function(data){
                     location.href ="Questions/index?id={$list.id}";//跳转页面
                }
	            });
           }

/*            success:function(data) {  
              if(data.msg =="true" ){  
             // view("修改成功！");  
                 alert("修改成功！");  
                 window.location.reload();  
             }else{  
               view(data.msg);  
           }  
           }, */ 
   /*        error : function() {  
           // view("异常！");  
              alert("异常！");  
           }  */
       
    	}else{
    		alert('姓名不能为空或者不能大于4！')
    	}


    })


})	


</script>
</body>
</html>